<template>
  <view class="">
    <!--    <view class="uni-page-head" v-if="titleFlag">-->
    <!--      <image class="common-title-img" style="left: 20rpx;"-->
    <!--             :src="require('../../static/imges/fanhui.png')" @click="back()"></image>-->
    <!--      <view class="uni-page-head-title">-->
    <!--        出库单查看-->
    <!--      </view>-->
    <!--    </view>-->
    <!--    <view v-if="titleFlag" style="margin-top: 98rpx;">-->
    <!--      &lt;!&ndash; 这个盒子是用来撑空间，又不想改变下边的body盒子 所以在这加了一个空盒子，可以根据新老MOA判断 &ndash;&gt;-->
    <!--    </view>-->
    <view style="width: 100%; margin-top: 10px;" v-for="(item,index) in chukulist" :key="index">
      <view class="common-body-ex">
        <view class="common-list-ex-patch" v-if="type==='2'">
          <label class="common-list-title-ex">站址编码 :</label>
          <text :selectable="true" class="common-list-text-ex-patch" style="height: auto;" type="text">
            {{ item.siteId }}
          </text>
        </view>
        <view class="common-list-ex-patch" style="height: auto">
          <label class="common-list-title-ex">出库订单号 :</label>
          <text :selectable="true" class="common-list-text-ex-patch" style="height: auto;word-break: break-all" type="text">
            {{ item.orderId }}
          </text>
        </view>
        <view class="common-list-ex-patch">
          <label class="common-list-title-ex">出库明细行号 :</label>
          <text :selectable="true" class="common-list-text-ex-patch" style="height: auto;" type="text">
            {{ item.osDetailId }}
          </text>
        </view>
        <view class="common-list-ex-patch">
          <label class="common-list-title-ex">物料编码 :</label>
          <text :selectable="true" class="common-list-text-ex-patch" style="height: auto;" type="text">
            {{ item.categoryCode }}
          </text>
        </view>
        <view class="common-list-ex-patch" style="height: auto">
          <label class="common-list-title-ex">物料名称 :</label>
          <text :selectable="true" class="common-list-text-ex-patch" style="height: auto;" type="text">
            {{ item.categoryName }}
          </text>
        </view>
        <view class="common-list-ex-patch">
          <label class="common-list-title-ex">商品编码 :</label>
          <text :selectable="true" class="common-list-text-ex-patch" style="height: auto;" type="text">
            {{ item.materialCode }}
          </text>
        </view>
        <view class="common-list-ex-patch">
          <label class="common-list-title-ex">商品名称 :</label>
          <text :selectable="true" class="common-list-text-ex-patch" style="height: auto;" type="text">
            {{ item.materialName }}
          </text>
        </view>
        <view class="common-list-ex-patch">
          <label class="common-list-title-ex">合同编码 :</label>
          <text :selectable="true" class="common-list-text-ex-patch" style="height: auto;" type="text">
            {{ item.contractCode }}
          </text>
        </view>
        <view class="common-list-ex-patch">
          <label class="common-list-title-ex">单位计量 :</label>
          <text class="common-list-text-ex-patch" style="height: auto;" type="text">{{ item.dwjl }}</text>
        </view>
        <view class="common-list-ex-patch">
          <label class="common-list-title-ex">计量单位 :</label>
          <text class="common-list-text-ex-patch" style="height: auto;" type="text">{{ item.unit }}</text>
        </view>
        <view class="common-list-ex-patch">
          <label class="common-list-title-ex">不含税单价 :</label>
          <text class="common-list-text-ex-patch" style="height: auto;" type="text">{{ item.price }}</text>
        </view>
        <view class="common-list-ex-patch">
          <label class="common-list-title-ex">含税总金额 :</label>
          <text class="common-list-text-ex-patch" style="height: auto;" type="text">{{ item.totalTaxAmount }}</text>
        </view>
        <view class="common-list-ex-patch">
          <label class="common-list-title-ex">出库数量 :</label>
          <text class="common-list-text-ex-patch" style="height: auto;" type="text">{{ item.osAmount }}</text>
        </view>
        <view class="common-list-ex-patch">
          <label class="common-list-title-ex">出库时间 :</label>
          <text class="common-list-text-ex-patch" style="height: auto;" type="text">{{ item.osTime }}</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      chukulist: [],
      applyId: '',
      categoryCode: '',
      subPrjId: '',
      dwjl: '',
      titleFlag: true,
      type: ''
    }
  },
  onLoad(option) {
    this.applyId = option.applyId
    this.categoryCode = option.categoryCode
    this.prjId = option.subPrjId
    this.dwjl = option.dwjl
    this.type = option.type
    //判断新老MOA用来显示导航栏
    if (uni.getStorageSync('moaType') == "0") {
      this.titleFlag = false
    }
    this.getList();
  },
  methods: {
    back() {
      uni.navigateBack({
        delta: 1
      });
    },

    getList() {

      let parmas = {
        subPrjId: this.prjId,
        applyId: this.applyId,
        categoryCode: this.categoryCode,
        dwjl: this.dwjl,
      }

      this.$axios.post('/material/api/receive/equip/queryOsEquipList', parmas).then((res) => {
        this.chukulist = res.data
      }).catch((e) => {
        console.log('error', e)
      })

    },


  }
}
</script>


<style>
@import '@/common/common-ui.css';
</style>
